import request from '@/config/axios'
/**
 * 查询发信域名
 */
export const domainList = (params) => {
  return request.get({ url: '/market/market-setting/domain-list', params })
}

/**
 * 获取单个发信域名
 */
export const singleGetDomain = (id) => {
  return request.get({ url: '/market/market-setting/single-get-domain?id=' + id })
}

/**
 * 新增发信域名
 */
export const createDomain = (data) => {
  return request.post({ url: '/market/market-setting/create-domain', data })
}

/**
 * 更新发信域名
 */
export const updateDomain = (data) => {
  return request.put({ url: '/market/market-setting/update-domain', data })
}

/**
 * 删除发信域名
 */
export const deletedDomain = (id) => {
  return request.delete({ url: '/market/market-setting/deleted-domain?id=' + id })
}

/**
 * 查询发件人
 */
export const senderList = (params) => {
  return request.get({ url: '/market/market-setting/sender-list', params })
}

/**
 * 获取单个发件人
 */
export const singleGetSender = (id) => {
  return request.get({ url: '/market/market-setting/single-get-sender?id=' + id })
}

/**
 * 新增发件人
 */
export const createSender = (data) => {
  return request.post({ url: '/market/market-setting/create-sender', data })
}

/**
 * 更新发件人
 */
export const updateSender = (data) => {
  return request.put({ url: '/market/market-setting/update-sender', data })
}

/**
 * 删除发件人
 */
export const deletedSender = (id) => {
  return request.delete({ url: '/market/market-setting/deleted-sender?id=' + id })
}

/**
 * 查询回复人
 */
export const replyList = (params) => {
  return request.get({ url: '/market/market-setting/reply-list', params })
}

/**
 * 获取单个回复人
 */
export const singleGetReply = (id) => {
  return request.get({ url: '/market/market-setting/single-get-reply?id=' + id })
}

/**
 * 新增回复人
 */
export const createReply = (data) => {
  return request.post({ url: '/market/market-setting/create-reply', data })
}

/**
 * 更新回复人
 */
export const updateReply = (data) => {
  return request.put({ url: '/market/market-setting/update-reply', data })
}

/**
 * 删除回复人
 */
export const deletedReply = (id) => {
  return request.delete({ url: '/market/market-setting/deleted-reply?id=' + id })
}
